using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using SILAS.DAO.Models.Mapping;
using SILAS.Entidades;

namespace SILAS.DAO
{
    public class SILASBDContext : DbContext
    {
        static SILASBDContext()
        {
            Database.SetInitializer<SILASBDContext>(null);
        }

		public SILASBDContext()
			: base("Name=SILASBDContext")
		{
		}

        public DbSet<Cargo> Cargoes { get; set; }
        public DbSet<Ciudadano> Ciudadanoes { get; set; }
        public DbSet<DetalleVisita> DetalleVisitas { get; set; }
        public DbSet<Empleado> Empleadoes { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<Visita> Visitas { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CargoMap());
            modelBuilder.Configurations.Add(new CiudadanoMap());
            modelBuilder.Configurations.Add(new DetalleVisitaMap());
            modelBuilder.Configurations.Add(new EmpleadoMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new VisitaMap());
        }
    }
}
